<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器-02</title>
    <!-- 一般引入js文件，都是在 head 标签内部 -->
    <script src="js/jquery-3.5.1.js"></script>

</head>
<body>

    <div style="background-color: red">
        <form action="">
            <input type="text" id="username" name="username">
            <input type="password" id="password" name="password">
            <input type="date" id="birthdate" name="birthdate">
            <input type="tel" id="phone">
            <input type="checkbox" name="hobbies" value="eat">吃饭
            <input type="checkbox" name="hobbies" value="sleep">睡觉
            <input type="checkbox" name="hobbies" value="playIphone">玩苹果

        </form>
    </div>

    <script type="text/javascript">

        // 选择到那些 name 属性是 hobbies 的元素
        let e = $("input[name=hobbies]") ;
        console.log( e ) ;
        e = $(":checkbox[name=hobbies]:first") ;
        console.log( e ) ;

    </script>

</body>
</html>